#!/usr/bin/env python

"""
docstring
"""

__author__ = 'rx.wen218@gmail.com'
import datetime

class Post:
    def __init__(self, postid = '', title = '', summary = '', content = '', create_date = datetime.datetime.now(), update_date = datetime.datetime.now(), tags = []):
        self.postid = postid
        self.title = title
        self.summary = summary
        self.content = content
        self.create_date = create_date
        self.update_date = update_date
        if None == tags:
            tags = []
        self.tags = tags

# called by print
    def __str__(self):
        return 'postid:\t%s\ntitle:\t%s\ncreate:\t%s\n' % (self.postid, self.title, self.create_date)

# called via output
    def __repr__(self):
        return self.__str__()
